<!DOCTYPE html>
<html lang="zh" xmlns:th="http://www.thymeleaf.org" >
<head>
    <th:block th:include="include :: header('修改非银行第三方支付机构（拿到支付许可证的）')" />
    <th:block th:include="include :: datetimepicker-css" />
</head>
<body class="white-bg">
    <div class="wrapper wrapper-content animated fadeInRight ibox-content">
        <form class="form-horizontal m" id="form-agency-edit" th:object="${thirdPaymentAgency}">
            <input name="id" th:field="*{id}" type="hidden">
            <div class="form-group">    
                <label class="col-sm-3 control-label is-required">机构名称：</label>
                <div class="col-sm-8">
                    <input name="name" th:field="*{name}" class="form-control" type="text" required>
                </div>
            </div>
            <div class="form-group">    
                <label class="col-sm-3 control-label is-required">支付许可证编号：</label>
                <div class="col-sm-8">
                    <input name="warrantNo" th:field="*{warrantNo}" class="form-control" type="text" required>
                </div>
            </div>
            <div class="form-group">    
                <label class="col-sm-3 control-label is-required">负责人：</label>
                <div class="col-sm-8">
                    <input name="who" th:field="*{who}" class="form-control" type="text" required>
                </div>
            </div>
            <div class="form-group">    
                <label class="col-sm-3 control-label">经营范围：</label>
                <div class="col-sm-8">
                    <input name="scope" th:field="*{scope}" class="form-control" type="text">
                </div>
            </div>
            <div class="form-group">
                <label class="col-sm-3 control-label is-required">经营范围说明：</label>
                <div class="col-sm-8">
                    <textarea name="scopeRemark" class="form-control" required>[[*{scopeRemark}]]</textarea>
                </div>
            </div>
            <div class="form-group">    
                <label class="col-sm-3 control-label is-required">注册地：</label>
                <div class="col-sm-8">
                    <input name="registrationArea" th:field="*{registrationArea}" class="form-control" type="text" required>
                </div>
            </div>
            <div class="form-group">
                <label class="col-sm-3 control-label">业务经营地区限制：</label>
                <div class="col-sm-8">
                    <textarea name="businessArea" class="form-control">[[*{businessArea}]]</textarea>
                </div>
            </div>
            <div class="form-group">
                <label class="col-sm-3 control-label is-required">机构总部详细地址：</label>
                <div class="col-sm-8">
                    <textarea name="address" class="form-control" required>[[*{address}]]</textarea>
                </div>
            </div>
            <div class="form-group">    
                <label class="col-sm-3 control-label is-required">失效日期：</label>
                <div class="col-sm-8">
                    <div class="input-group date">
                        <input name="expirationDate" th:value="${#dates.format(thirdPaymentAgency.expirationDate, 'yyyy-MM-dd')}" class="form-control" placeholder="yyyy-MM-dd" type="text" required>
                        <span class="input-group-addon"><i class="fa fa-calendar"></i></span>
                    </div>
                </div>
            </div>
            <div class="form-group">    
                <label class="col-sm-3 control-label">首次许可日期：</label>
                <div class="col-sm-8">
                    <div class="input-group date">
                        <input name="firstCreateDate" th:value="${#dates.format(thirdPaymentAgency.firstCreateDate, 'yyyy-MM-dd')}" class="form-control" placeholder="yyyy-MM-dd" type="text">
                        <span class="input-group-addon"><i class="fa fa-calendar"></i></span>
                    </div>
                </div>
            </div>
            <div class="form-group">    
                <label class="col-sm-3 control-label">最后一次变更日期：</label>
                <div class="col-sm-8">
                    <div class="input-group date">
                        <input name="lastUpdateDate" th:value="${#dates.format(thirdPaymentAgency.lastUpdateDate, 'yyyy-MM-dd')}" class="form-control" placeholder="yyyy-MM-dd" type="text">
                        <span class="input-group-addon"><i class="fa fa-calendar"></i></span>
                    </div>
                </div>
            </div>
            <div class="form-group">
                <label class="col-sm-3 control-label">中国人民银行官网展示页地址：</label>
                <div class="col-sm-8">
                    <textarea name="pbcUrl" class="form-control">[[*{pbcUrl}]]</textarea>
                </div>
            </div>
            <div class="form-group">
                <label class="col-sm-3 control-label">备注说明信息：</label>
                <div class="col-sm-8">
                    <textarea name="remark" class="form-control">[[*{remark}]]</textarea>
                </div>
            </div>
        </form>
    </div>
    <th:block th:include="include :: footer" />
    <th:block th:include="include :: datetimepicker-js" />
    <script th:inline="javascript">
        var prefix = ctx + "business/agency";
        $("#form-agency-edit").validate({
            focusCleanup: true
        });

        function submitHandler() {
            if ($.validate.form()) {
                $.operate.save(prefix + "/edit", $('#form-agency-edit').serialize());
            }
        }

        $("input[name='expirationDate']").datetimepicker({
            format: "yyyy-mm-dd",
            minView: "month",
            autoclose: true
        });

        $("input[name='firstCreateDate']").datetimepicker({
            format: "yyyy-mm-dd",
            minView: "month",
            autoclose: true
        });

        $("input[name='lastUpdateDate']").datetimepicker({
            format: "yyyy-mm-dd",
            minView: "month",
            autoclose: true
        });
    </script>
</body>
</html>